//
//  ArticleCommonFEIRQTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ArticleCommonFEIRQTableViewCell.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation ArticleCommonFEIRQTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgimage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bgimage];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont systemFontOfSize:15* WIDTH * HEIGH];
        self.titleLabel.numberOfLines = 0;
        [self.titleLabel sizeToFit];
        [self.contentView addSubview:self.titleLabel];
        
        self.typeNameImage = [[UIImageView alloc]init];
        self.typeNameImage.image = [UIImage imageNamed:@"iconfont-iconfontlingxing@2x.png"];
        [self.contentView addSubview:self.typeNameImage];
        
        self.typeNameLabel = [[UILabel alloc]init];
        self.typeNameLabel.font = [UIFont systemFontOfSize:12 * WIDTH * HEIGH];
        self.typeNameLabel.textColor = [UIColor whiteColor];
        [self addSubview:self.typeNameLabel];
        
        self.describLabel = [[UILabel alloc]init];
       
        self.describLabel.font = [UIFont systemFontOfSize:13 * WIDTH * HEIGH];
        self.describLabel.numberOfLines = 0;
        [self.describLabel sizeToFit];
        [self.contentView addSubview:self.describLabel];
        
        self.avatarImage = [[UIImageView alloc]init];
        self.avatarImage.layer.cornerRadius = 15;
        self.avatarImage.clipsToBounds = YES;
        [self.contentView addSubview:self.avatarImage];
        
        self.screen_nameLabel = [[UILabel alloc]init];
        self.screen_nameLabel.font = [UIFont systemFontOfSize:13 * WIDTH * HEIGH];
        [self.contentView addSubview:self.screen_nameLabel];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.bgimage.frame = CGRectMake(10 * WIDTH , 10 * HEIGH, self.contentView.bounds.size.width-20 * WIDTH, 210 * HEIGH);
    self.titleLabel.frame = CGRectMake(50 * WIDTH , 220 * HEIGH, self.contentView.bounds.size.width-50 * WIDTH, 40 * HEIGH);
    self.describLabel.frame = CGRectMake(50 * WIDTH,260 * HEIGH, self.contentView.bounds.size.width - 60 * WIDTH, 80 * HEIGH);
    self.avatarImage.frame = CGRectMake(50 * WIDTH, 340 * HEIGH, 30 * WIDTH, 30 * HEIGH);
    self.screen_nameLabel.frame = CGRectMake(90 * WIDTH, 345 * HEIGH, 200 * WIDTH, 20 * HEIGH);
    self.typeNameImage.frame = CGRectMake(10 * WIDTH, 230 * HEIGH, 30 * WIDTH, 30 * HEIGH);
    self.typeNameLabel.frame = CGRectMake(13 * WIDTH, 230 * HEIGH, 40 * WIDTH, 30 * HEIGH);
    
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
